package com.shuyu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shuyu.domain.ApprovalAuthorize;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ApprovalAuthorizeMapper extends BaseMapper<ApprovalAuthorize> {
    @Select("select t1.*,t2.nick_name as user_name,t3.nick_name as authorize_user_name " +
            "from tbl_approval_authorize t1 " +
            "left join sys_user t2 on t1.user_id = t2.user_id  " +
            "left join sys_user t3 on t1.authorize_user_id =t3.user_id where t1.user_id = #{userId}")
    List<ApprovalAuthorize> getList( long userId);

}
